import axios from '@/utils/axios';

//时间设置查询
export const getTime = () => {
    return axios({
      url: '/conference/room/init/time',
      method: 'get'
    })
}
//时间设置修改
export const putTime = (data) => {
    return axios({
      url: '/conference/room/init/time',
      method: 'put',
      data
    })
}

//查询位置列表
export const getPositionList = (data) => {
    return axios({
      url: '/conference/room/init/position/list',
      method: 'post',
      data
    })
}
//新增位置信息 
export const addPosition = (data) => {
    return axios({
      url: '/conference/room/init/position',
      method: 'post',
      data
    })
}
//修改位置信息 
export const putPosition = (data) => {
    return axios({
      url: '/conference/room/init/position',
      method: 'put',
      data
    })
}
//获取位置详情 
export const positionId = (positionId) => {
    return axios({
      url: `/conference/room/init/position/${positionId}`,
      method: 'get'
    })
}
//删除位置
export const delPositionId = (positionId) => {
    return axios({
      url: `/conference/room/init/position/${positionId}`,
      method: 'delete'
    })
}

//设备列表 
export const deviceList = (data) => {
  return axios({
    url: `/conference/room/init/device/list`,
    method: 'post',
    data
  })
}
//新增设备
export const addDevice = (data) => {
  return axios({
    url: `/conference/room/init/device`,
    method: 'post',
    data
  })
}
//获取设备详情
export const getDevice = (deviceId) => {
  return axios({
    url: `/conference/room/init/device/${deviceId}`,
    method: 'get'
  })
}
//修改设备信息 
export const upDevice = (data) => {
  return axios({
    url: `/conference/room/init/device`,
    method: 'put',
    data
  })
}
//删除设备
export const delDevice = (positionId) => {
  return axios({
    url: `/conference/room/init/device/${positionId}`,
    method: 'delete'
  })
}

//管理员设备列表
export const adminList = (data) => {
  return axios({
    url: `/conference/room/init/admin/list`,
    method: 'post',
    data
  })
}
//人员分配
export const addAdmin = (data) => {
  return axios({
    url: `/conference/room/init/admin`,
    method: 'post',
    data
  })
}
//获取人员分配详情
export const getAdmin = (adminId) => {
  return axios({
    url: `/conference/room/init/admin/${adminId}`,
    method: 'get'
  })
}
//修改人员分配
export const upAdmin = (data) => {
  return axios({
    url: `/conference/room/init/admin`,
    method: 'post',
    data
  })
}
//删除人员
export const delAdmin = (adminId) => {
  return axios({
    url: `/conference/room/init/admin/${adminId}`,
    method: 'delete'
  })
}